#include "task.hpp"
#include "ThreadPool.hpp"

using namespace ThreadPoolModule;


int main()
{
    LOG_CONSOLE;
    // LOG_FILE;

    std::unique_ptr<ThreadPool<task_t>> pool_ptr = std::make_unique<ThreadPool<task_t>>(3);
    // std::unique_ptr<ThreadPool<task_t2>> pool_ptr = std::make_unique<ThreadPool<task_t2>>(3);

    pool_ptr->Start();
    int nr_task = 10;
    for(int i = 0; i < nr_task; ++i)
    {
        pool_ptr->Enqueue(task);
        
        // pool_ptr->Enqueue(task_t2());
    }

    pool_ptr->Stop();

    sleep(3);

    pool_ptr->End();

    return 0;
}
